1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | IF NOT xInit THEN UM ( sName := 'Normal Operation', dwAllowsLeavingFromStates := PACK_ML.State.Stopped OR PACK_ML.State.Aborted OR PACK_ML.State.Idle, IF SysStrCmp(Client.sCommandToPLC, Client.LockCommands[0]) = 0 THEN; Lock_CO_Match := TRUE; ELSIF SysStrCmp(Client.sCommandToPLC, 'UnSuspend') = 0 THEN UnSuspend(); END_CASE Client.iCommandToPLC := 0; Client.sCommandToPLC := ''; Client.bReadyToPLC := FALSE; CASE UM.CurrentState OF PACK_ML.State.Stopped: ; PACK_ML.State.Aborted: PACK_ML.State.Idle: PACK_ML.State.Complete : PACK_ML.State.Execute : IF puzzleTimer.iProcess = 20 THEN IF Client.ActualStep < 30 THEN SendCommand(Command := CommandType.Hint ,Value := 'The statemachine is visible in the display.'); IF puzzleTimer.iProcess = 50 THEN IF Client.ActualStep >= 30 THEN SendCommand(Command := CommandType.Media ,Value := 'Automation Suite'); CASE Client.ActualStep OF 0: // aborted LaserGamePuzzle := PACK_ML.Aborted; DO_Reset_Light := bl.OUT; SendCommand(Command:= CommandType.Key, Value:= Client.KeyCommands[0]); // cabinet enabled IF NOT DI_Stop THEN Client.ActualStep := 10; DO_In_Bedrijf_Light := FALSE; DO_Laser_ON := FALSE; IF NOT DI_NoodstopCabinet THEN; 30: // Execute LaserGamePuzzle := PACK_ML.Execute; ton(PT := T#2M,IN := TRUE); IF Lock_CO_Match THEN //OR ton.Q StateComplete(); DO_In_Bedrijf_Light := FALSE; END_IF END_CASE Client.Progress := puzzleTimer.iProcess; PACK_ML.State.Resetting : Client.Progress := 0; DO_Storing_Light := FALSE; DO_Auto_Hand_Light := FALSE; DO_Laser_ON := FALSE; KEY_puzzleFinished := FALSE; PACK_ML.State.Starting : Client.Progress := 100; DO_Storing_Light := TRUE; DO_Spanning_Light := TRUE; PACK_ML.State.Clearing : IF NOT (DI_EmergencyGF AND NOT DI_EmergencyFF) THEN Abort(); Client.ActualState := UM.CurrentState; puzzleTimer(xStartTimer := UM.CurrentState = PACK_ML.State.Execute ,xPauseTimer := ,xStopTimer:= NOT (UM.CurrentState = PACK_ML.State.Execute),tMaxPuzzleTime := Client.Duration); //Stop(); bl2(ENABLE := TRUE,TIMELOW := T#500MS,TIMEHIGH:= T#500MS); {a9ed5b7e-75c5-4651-af16-d2c27e98cb94} VAR_IN_OUT END_VAR UM : PACK_ML.UnitMode; xInit : BOOL := FALSE; // Flag for initialization bl : blink; ton : TON; Key_CO_Panel_On : BOOL; //DI_NoodstopCabinet : BOOL := TRUE ; 588 {8e575c5b-1d37-49c6-941b-5c0ec7874787} ChildObjectGuids AddAttributeSubsequent |